apiVersion: kubeadm.k8s.io/v1beta2
kind: InitConfiguration
bootstrapTokens:
- groups:
  - system:bootstrappers:kubeadm:default-node-token
  token: 'abcdef.0123456789abcdef'
  ttl: '24h0m0s'
  usages:
  - signing
  - authentication
nodeRegistration:
  name: "{{ node_name }}"
  taints:
  - effect: 'NoSchedule'
    key: 'node-role.kubernetes.io/master'
  kubeletExtraArgs:
{% for host in groups['master'] %}
    node-ip: "{{ hostvars[host].inventory_hostname }}"
{% endfor %}


---
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
certificatesDir: '/etc/kubernetes/pki'
clusterName: 'kubernetes'
imageRepository: {{ k8s.hub }}:5000/k8s
kubernetesVersion: 'v1.18.19'
controlPlaneEndpoint: "{{ k8s.vip_domain }}:{{ k8s.api_port }}"
apiServer:
  timeoutForControlPlane: '4m0s'
  extraArgs:
    audit-log-path: '/var/log/k8s-audit/audit.log'
controllerManager:
  extraArgs:
    bind-address: '0.0.0.0'
scheduler:
  extraArgs:
    address: '0.0.0.0'
dns:
  type: 'CoreDNS'
  imageRepository: {{ k8s.hub }}:5000/k8s
  imageTag: '1.6.7'
etcd:
  local:
    dataDir: '/var/lib/etcd'
    imageRepository: {{ k8s.hub }}:5000/k8s
    imageTag: '3.4.3-0'
networking:
  dnsDomain: 'cluster.local'
  podSubnet: {{ k8s.pod_subnet }}
  serviceSubnet: {{ k8s.service_subnet }}
featureGates: {}

---
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
cgroupDriver: systemd

---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: ipvs